/*  */
"use strict"
/** @param {import("egg").Application} app */
module.exports = app => {
	const Sequelize = app.Sequelize
	const sequelize = app.model

	let storeSell = sequelize.define("storeSell", {
		oid: {
			type: Sequelize.STRING,
		},
		sell_time: {
			defaultValue: sequelize.literal("CURRENT_TIMESTAMP"),
			type: Sequelize.DATE,
			get() {
				return Date.parse(this.getDataValue("last_sell"))
			}
		}
	}, {
		tableName: "empire_store_sell",
		timestamps: false
	})
	// storeSell.sync({alter: true})
	return storeSell
}